#ifndef SERVERMESSAGEHANDLE_H
#define SERVERMESSAGEHANDLE_H

#include "resip/dum/ServerPagerMessage.hxx"
#include "resip/dum/PagerMessageHandler.hxx"

#include <string>

class Controller;


class ServerMessageHandler : public resip::ServerPagerMessageHandler
{
public:
	// Constructor & Destructor

	ServerMessageHandler(Controller* parent);
	virtual ~ServerMessageHandler();

	// Memberfunctions

	void initialize();
	void cleanup();

	// Callbacks

	virtual void onMessageArrived(resip::ServerPagerMessageHandle h, const resip::SipMessage & message);

private:
	// Common functions

	std::string parseContactName(std::string from);

	// Membervariables

	Controller* m_owner;
};

#endif